package com.touna.tools;


import java.util.List;

/**
 * author: xl
 * time: 2018/2/26 13:57
 * description:
 **/
public class Page <T>{

    int total;

    private List<T> rows;

    int pageIndex;

    int pageSize;

    public Page(int pageIndex, int pageSize) {
        this.pageIndex = (pageIndex-1)*pageSize;
        this.pageSize = pageSize;
    }

    public int getTotal() {
        return total;
    }

    public void setTotal(int total) {
        this.total = total;
    }

    public int getPageIndex() {
        return pageIndex;
    }

    public void setPageIndex(int pageIndex) {
        pageIndex = (pageIndex-1)* pageSize;
        this.pageIndex = pageIndex;
    }

    public int getPageSize() {
        return pageSize;
    }

    public void setPageSize(int pageSize) {
        this.pageSize = pageSize;
    }

    public List<T> getRows() {
        return rows;
    }

    public void setRows(List<T> rows) {
        this.rows = rows;
    }
}
